/*    */ package com.newcrm.db;
/*    */ 
/*    */ import java.sql.Connection;
/*    */ import java.sql.SQLException;
/*    */ import java.util.List;
/*    */ import java.util.Map;
/*    */ import org.apache.commons.dbutils.DbUtils;
/*    */ import org.apache.commons.dbutils.MyMapListHandler;
/*    */ import org.apache.commons.dbutils.QueryRunner;
/*    */ import org.apache.log4j.Logger;
/*    */ 
/*    */ public class CustomerPermissionsChangeManager
/*    */ {
/* 19 */   private static Logger logger = Logger.getLogger(CustomerPermissionsChangeManager.class.getName());
/*    */ 
/*    */   public List<Map<String, Object>> listChangeLog(int customerId)
/*    */     throws SQLException
/*    */   {
/* 31 */     Connection conn = ConnectionManager.getInstance().getConnection();
/* 32 */     if (conn == null) {
/* 33 */       return null;
/*    */     }
/*    */ 
/* 36 */     QueryRunner runner = new QueryRunner();
/*    */     try {
/* 38 */       return (List)runner.query(conn, 
/* 39 */         "SELECT * FROM T_Customer_Permissions_Change_Info WHERE CustomerId = ? ORDER BY ChangeDate DESC ", 
/* 40 */         new MyMapListHandler(), new Object[] { Integer.valueOf(customerId) });
/*    */     } finally {
/*    */       try {
/* 43 */         DbUtils.close(conn);
/*    */       } catch (SQLException e) {
/* 45 */         logger.warn("close conn failed", e);
/*    */       }
/*    */     }
/*    */   }
/*    */ }

/* Location:           C:\E\referenceProject\CRM参考\qikebao\WEB-INF\lib\qikebao.jar
 * Qualified Name:     com.newcrm.db.CustomerPermissionsChangeManager
 * JD-Core Version:    0.6.1
 */